<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://unpkg.com/vue/dist/vue.js"></script>
</head>
<body>
    <div id="test">
        <!--条件指令：v-if：是否渲染DOM节点;true渲染，false不渲染-->
        <!--注意v-if和v-show的区别-->
        <div v-if="bool">老发大幅度发地方</div><!--是否加载节点(DOM中放不放节点)-->
        <div v-show="bool">hello</div><!--DOM节点已经加载好了，true显示，false->display：none了-->

        <!--使用v-for循环渲染DOM节点-->
        <div v-for="item in arr">
            <h1>{{item}}</h1>
        </div>
    </div>
</body>
<script type="text/javascript">
    var vm=new Vue({
        el:'#test',
        data:{bool:false,arr:['toni','tim','cang']}
    });
</script>
</html>